//package edu.kit.ksri.db.mturk.workerpools;
//
//import java.util.ArrayList;
//import java.util.List;
//
//
//
//
///**
// * @author Pascal Wichmann
// * 
// * 
// *         created on 06.11.2010
// * 
// */
//
///*
// * 
// * This class inherits from AbstractWorker class!
// * 
// */
//
//public class ICDWorker_old extends AbstractWorker {
//	
//	/**
//	 *  
//	 */
//	private static final long serialVersionUID = 1195983132558371416L;
//	
//	/** 
//	 * the worker id 
//	 * Please note: The worker ID belongs into the AbstractWorker class. Do NOT try to declare it here!
//	 */
////	private final String workerId; --> evil!
//	
//	
//	/**
//	 * this worker's sensitivity values 
//	 * 
//	 * the values that have been estimated for previous tasks are separately stored in an ArrayList
//	 * this would potentially allow for time series with trends as well as worker-specific probability distributions
//	 * 
//	 */
//	private List<Double> sensitivityList = new ArrayList<Double>(); 
//	
//	
//	/**
//	 * this worker's specificity values
//	 * 
//	 * the values that have been estimated for previous tasks are separately stored in an ArrayList
//	 * 
//	 */
//	private List<Double> specificityList = new ArrayList<Double>(); 
//	
//	
//	// FIXME: Pascal: ich muss noch ein correctness level errechnen, indem ich specificity und sensitivity kombiniere!!
//	
//	
//	// constructor
//	/**
//	 * @param workerId
//	 * @param specificity
//	 * @param sensitivity
//	 * 
//	 */
//	public ICDWorker_old(String workerId, int totalAssignments, double specificity, double sensitivity) {
//		super();
//		this.workerId = workerId;
//		this.totalAssignments = totalAssignments;
//		this.specificityList.add(specificity);
//		this.sensitivityList.add(sensitivity);
//		this.correctnessLevel = (specificity + sensitivity)/2; //FIXME Pascal
//	}
//	
//	// Only used if a completely unknown worker has to be constructed
//	public ICDWorker_old(String workerId, double correctnessLevel){
//		super();
//		this.workerId = workerId;
//		this.correctnessLevel = correctnessLevel;
//		this.specificityList.add(correctnessLevel);
//		this.sensitivityList.add(correctnessLevel);
//	}
//	
//	// If we need to compare two workers we need a combined measure of sensitivity and specificity to avoid
//	// conflicting results, e.g. if sens1 > sens2 but spec1 < spec2
//	public int compareTo(AbstractWorker other) {
//		if (!(other instanceof ICDWorker_old))
//			try {
//				throw new Exception("Cannot compare workers of different types.");
//			} catch (Exception e) {
//				e.printStackTrace();
//			}
//		if (this.correctnessLevel < other.correctnessLevel)
//			return 1;
//		if (this.correctnessLevel > other.correctnessLevel)
//			return -1;
//		return 0;
//	}
//	
//	/**
//	 * @return the average specificity
//	 * 
//	 * a simple arithmetic average is used
//	 */
//	public double getAverageSpecificity() {
//		double sum = 0;
//		int numberOfEntries = this.specificityList.size();
//		 for (int i=0; i < numberOfEntries; i++){
//			  sum = sum + this.specificityList.get(i);
//		  }
//		return (sum / numberOfEntries);
//	}
//
//	/**
//	 * @return the average sensitivity
//	 * 
//	 * a simple arithmetic average is used
//	 */
//	public double getAverageSensitivity() {
//		double sum = 0;
//		int numberOfEntries = this.sensitivityList.size();
//		 for (int i=0; i < numberOfEntries; i++){
//			  sum = sum + this.sensitivityList.get(i);
//		  }
//		return (sum / numberOfEntries);
//	}
//	
//
//	/**
//	 * @return the workerId
//	 */
//	public String getWorkerId() {
//		return this.workerId;
//	}
//
//	public void setTotalAssignments (int i){
//		this.totalAssignments = i;
//	}
//	
//	public void addSensitivityValue(double d){
//		this.sensitivityList.add(d);
//	}
//	
//	public void addSpecificityValue(double d){
//		this.specificityList.add(d);
//	}
//	
//	@Override
//	public boolean equals(Object arg) {
//		// TODO Auto-generated method stub
//		return false;
//	}
//
//	@Override
//	public String[] toStringArray() {
//		// TODO Auto-generated method stub
//		return null;
//	}
//
//	
//}
